package cn.com.hd.mall.web.webservices.entity.response.shoppingcart;

import java.util.List;

/**
 * author: 李一方(<a href="mailto:liyifang@danlu.com">liyifang@danlu.com</a>)<br/>
 * version: 1.0.0<br/>
 * since: 2017-03-14 11:39
 *
 * <p>
 * Merch 的 Wrap
 * </p>
 */
public class MerchWraper {
    private String merchId;
    private String merchName;
    private String isValid;
    private String promotionType;
    private String promotionInfo;
    private boolean isSelected;
    private List<GiftListBean> giftList;

    public MerchWraper() {
        setIsValid("0");
    }

    public MerchWraper(String merchId) {
        this.merchId = merchId;
    }

    public boolean isValid() {
        return this.isValid.equals("1");
    }

    public void setIsValid(String isValid) {
        this.isValid = isValid;
    }

    public boolean isSelected() {
        return isSelected;
    }

    public void setSelected(boolean selected) {
        isSelected = selected;
    }

    public List<GiftListBean> getGiftList() {
        return giftList;
    }

    public void setGiftList(List<GiftListBean> giftList) {
        this.giftList = giftList;
    }

    public String getMerchId() {
        return merchId;
    }

    public void setMerchId(String merchId) {
        this.merchId = merchId;
    }

    public String getMerchName() {
        return merchName;
    }

    public void setMerchName(String merchName) {
        this.merchName = merchName;
    }

    public String getPromotionType() {
        return promotionType;
    }

    public void setPromotionType(String promotionType) {
        this.promotionType = promotionType;
    }

    public String getPromotionInfo() {
        return promotionInfo;
    }

    public void setPromotionInfo(String promotionInfo) {
        this.promotionInfo = promotionInfo;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }

        MerchWraper that = (MerchWraper) o;

        return merchId.equals(that.merchId);

    }

    @Override
    public int hashCode() {
        return merchId.hashCode();
    }
}
